<%--
  User: Shengzhao Li
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>账务搜索</title>

</head>
<body>
<%--account search page--%>
<div id="account_search_page" data-role="page" class="page">
    <div data-role="header" data-theme="f">
        <a href="${contextPath}/m/dashboard" data-icon="home" data-direction="reverse" data-transition="slide">主页</a>

        <h1>账务搜索</h1>
        <a href="../overview" data-icon="arrow-l" data-transition="slideup">返回</a>
    </div>
    <div data-role="content">
        <form:form commandName="accountSearch" action="${contextPath}/m/account/search/submit" method="get"
                   data-ajax="false" onsubmit="$.mobile.showPageLoadingMsg();">
            <div data-role="fieldcontain">
                <label for="account_search_amount">金额:</label>
                <input type="text" name="amount" id="account_search_amount" value="${accountSearch.amount}"
                       placeholder="可输入金额区间,如:1-10"/>
            </div>
            <div data-role="fieldcontain">
                <label for="account_search_type">类型(可多选):</label>
                <select id="account_search_type" name="types" multiple="multiple" data-native-menu="false">
                    <option value="">-------</option>
                    <c:forEach items="${accountTypes}" var="type">
                        <option value="${type.guid}" ${accountSearch.types eq type.guid?'selected':''}>
                                ${type.defaultType?'':'&gt;'}&nbsp;${type.name}
                        </option>
                    </c:forEach>
                </select>
            </div>
            <div data-role="fieldcontain">
                <label for="account_search_date">日期:</label>
                <input type="text" name="date" id="account_search_date" value="${accountSearch.date}"
                       placeholder="账务日期"/>
            </div>
            <div data-role="fieldcontain">
                <label for="account_search_description">关键字:</label>
                <input type="text" name="description" id="account_search_description"
                       value="${accountSearch.description}"
                       placeholder="模糊查找相关内容"/>
            </div>

            <div data-role="fieldcontain">
                <button type="submit" data-theme="b">搜索</button>
            </div>
        </form:form>
    </div>
    <script type="text/javascript">
        $(function () {
            $("#account_search_date").scroller({
                preset:'date',
                dateFormat:'yy-mm-dd',
                dateOrder:'ymmdd',
                theme:"jqm",
                lang:"zh",
                animate:"flip"
            });
        });
    </script>
</div>
</body>
</html>